/**
 * 
 */
package org.cuatrovientos.erp.model;

import java.sql.Date;

import javax.validation.constraints.Min;
import javax.validation.constraints.Past;
import javax.validation.constraints.Size;

import org.springframework.beans.factory.annotation.Value;

/**
 * @author eneko_lana
 *
 */
public class Register {
	
	private int id;
	
	@Size(min=1,max=50,message="{shipment.name.error}")
	private String name;
	
	@Size(min=1,max=250,message="{shipment.description.error}")
	private String description;
	
	private java.sql.Date date;
	
	@Min(value=1,message="{shipment.iduser.error}")
	private int iduser;
	
	public Register () {
		
	}
	
	public Register(int id, String name, String description,
			Date timestamp, int iduser) {
		this.id = id;
		this.name = name;
		this.description = description;
		
		this.date = timestamp;
		this.iduser = iduser;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public java.sql.Date getTimestamp() {
		return date;
	}

	public void setTimestamp(java.sql.Date timestamp) {
		this.date = timestamp;
	}

	public int getIduser() {
		return iduser;
	}

	public void setIduser(int iduser) {
		this.iduser = iduser;
	}

	@Override
	public String toString() {
		return "Register [id=" + id + ", name=" + name + ", description="
				+ description + ", timestamp=" + date + ", iduser="
				+ iduser + "]";
	}

	
}